﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Configuration;
using WebUI.Models;

namespace WebUI.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to ASP.NET MVC!";

            return RedirectToAction("Index", "MappingFile");
            //var result = new TabelaDinamicaModel("referencia", "divBrmContratacao-BrmContratacao",
            //    new LinkTabelaModel("divBrmContratacao-BrmContratacao", "selecionado", "atualizarTabelaAtual(this, 'Citibank.ITFM.Dominio.Contratacao.BrmContratacao','divBrmContratacao-BrmContratacao')", "BrmContratacao"),
            //    new List<ReferenciaDinamicaModel>() 
                
                
            //    { 
            //        new ReferenciaDinamicaModel(new TabelaDinamicaModel("referencia0","divBrmContratacao-BrmContratacao-Fornecedor", 
            //        new LinkTabelaModel("divBrmContratacao-BrmContratacao-Fornecedor", null, "atualizarTabelaAtual(this, 'Citibank.ITFM.Dominio.Backoffice.Fornecedor','divBrmContratacao-BrmContratacao-Fornecedor')"
            //            ,"Fornecedor (Ambas)")), "arvoreIdentacao"),
            //        new ReferenciaDinamicaModel(new TabelaDinamicaModel("referencia0", "divBrmContratacao-BrmContratacao-RecursoSolicitante", 
            //        new LinkTabelaModel("divBrmContratacao-BrmContratacao-RecursoSolicitante", null, "atualizarTabelaAtual(this, 'Citibank.ITFM.Dominio.Backoffice.Recurso','divBrmContratacao-BrmContratacao-RecursoSolicitante')",
            //            "RecursoSolicitante (Ambas)")), "arvoreIdentacao"),
            //        new ReferenciaDinamicaModel(new TabelaDinamicaModel("referencia0", "divBrmContratacao-BrmContratacao-Status", 
            //        new LinkTabelaModel("divBrmContratacao-BrmContratacao-Status", null, "atualizarTabelaAtual(this, 'Citibank.ITFM.Dominio.Contratacao.StatusBRM','divBrmContratacao-BrmContratacao-Status')",
            //            "Status (Ambas)")), "arvoreIdentacao"),
            //    });

            //Util.XmlHelper.DeserializeFromXml<TabelaDinamicaModel>(@"C:\Documents and Settings\nd61955\Desktop\sss.xml");
            
            //Util.XmlHelper.SerializeToXml(result, @"C:\Documents and Settings\nd61955\Desktop\ssss.xml");

            //return View();

            //var process = new Models.ProcessFile { Processes = new List<Models.ProcessModel> { new Models.ProcessModel { ControlFile = "c:\asdas", OutFile = "c:\asas", Name = "process 1", Periodicy = Models.Periodicy.Daily, EndTime = new DateTime(1, 1, 1, 10, 30, 0), Responsible = "Fabio Cantarani" } } };

            //Util.XmlHelper.SerializeToXml(process, ConfigurationManager.AppSettings.Get("XmlPath").ToString());

            //return View();
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
